Setting breakpoints within code

Previous: 


Set at least one →breakpoint in the code or the logic. This procedure depends whether it is a code or a logic.

Restriction for a debugging session for the built-in PLC

Do not set a breakpoint onto a code line or for a FBD-logic that is run by several →tasks. This restriction results from malfunctions of the debugger, if several tasks are interrupted at the same time.

Setting breakpoint within C-code or ST-code

  1. Open the appropriate file or the appropriate object:

    File with C-code

    Double-click the file containing the C-code to open the file.
    The file lcxx___name.c contains the C-code for the element name as the name has been entered e.g. in the ST-code. xx is replaced by pu for a program, by fu for a function block or a function, by dt for a data type. Example: The file lcpu___counter.c contains the C-code as it has been created for the ST program Counter

    File with ST-code

    Double-click the ST-object to open the ST-editor.

  2. Point to the border left of the code that is executed and for which you want to set a breakpoint.
    (tick) Examples for code that is executed: →assignments→callsIF statements
    (error) Examples for code that is not executed: commentsdeclarations

  3. Open the context menu and select Toggle Breakpoint. Alternative: Double-click.
    Result:  is displayed at the border of the code.

Setting breakpoint within FBD-logic

  1. Open the FBD-object.

  2. Open the context menu for an FBD-element and select Toggle Breakpoint. See "Setting breakpoints for the calls of blocks and value fields" for details.
    Result:  is displayed for the FBD-element.

Disabling, enabling or skipping the set breakpoints

Good to know

(grey lightbulb) You are able to disable and enable any set breakpoint at any time. (warning) This is only possible, if the perspective Debug has already been opened.

Step

Result

  1. Select one or several breakpoints in the Breakpoints view.

  2. Open the context menu and select the command Disable.

is displayed at the border of the code. is displayed for the FBD-element.
Disabled breakpoints will not affect the execution of the application.

  1. Select one or several breakpoints in the Breakpoints view.

  2. Open the context menu and select the command Enable.

is displayed at the border of the code. is displayed for the FBD-element.
An enabled breakpoint will cause the application to suspend whenever this breakpoint is hit.

(grey lightbulb) You are also able to skip all breakpoints in one go, if the perspective Debug has already been opened.

Step

Result

In the menu Run, select the command Skip All Breakpoints.
Alternative: Click the button (either within the main toolbar of Neuron Power Engineer or within the toolbar of the Breakpoints view).

is displayed at the border of the code. or is displayed for the FBD-element.
Now all breakpoints will not affect the execution of the application.

If you want to have the breakpoints considered again, select the command Skip All Breakpoints anew or click the button again. Now the breakpoints are enabled or disabled – as the breakpoint has been before it has been skipped.